Example: HP Laptop 17-bs0xx

Analyzing the DSDT DSL

By looking at the DSL file, we find the registers we are interested in:

        Field (RAM, ByteAcc, Lock, Preserve)
        {
            [...]
            Offset (0x93), 
                ,   4, 
            FSH1,   1,
            Offset (0x94), 
            FSW1,   8,
            FAN1,   8,
                ,   4, 
            FSH2,   1, 
            Offset (0x97), 
            FSW2,   8, 
            FAN2,   8
            [...]
        }

Calculating the register addresses

Finding the WriteRegister

We try to set the fan speed using FAN1 and FSW1:

sudo ec_probe write 148 0
sudo ec_probe write 148 50
sudo ec_probe write 148 100
sudo ec_probe write 149 0
sudo ec_probe write 149 50
sudo ec_probe write 149 100

None of these changed the fan speed, so it's likely that we need to set another register. Luckily, we have FSH1 which is one bit long.

We read the FSH1 register:

sudo ec_probe read 147

Output: 4 (0x04)

This (0x04) is the state where manual fan control is disabled

        Field (RAM, ByteAcc, Lock, Preserve)
        {
            [...]
            Offset (0x93), 
                ,   4, 
            FSH1,   1,
        }

We see that FSH1 starts at bit 4, so the desired value to set manual control is: 1 << 4 = 16

We add the original value 4 and 16 and get 20. This is probably our value for enabling manual fan control.

sudo ec_probe write 147 20

Write to the FSW1 register

sudo ec_probe write 148 0
sudo ec_probe write 148 50
sudo ec_probe write 148 100
sudo ec_probe write 148 150
sudo ec_probe write 148 200
sudo ec_probe write 148 250

The fan speed changed.

Result: FSW1 is our WriteRegister, FAN1 is the ReadRegister, FSH1 will be use in RegisterWriteConfigurations

Finding the MinSpeedValue / MaxSpeedValue

How MinSpeedValue and MaxSpeedValue are discovered is not described here.

See the description for the HP 620 configuration file: Finding the ReadRegister values and Finding the WriteRegister values.

Writing the configuration file

See the configuration file on GitHub